package com.zdxf.service.impl;

import com.zdxf.domain.MenuDO;
import com.zdxf.mapper.MenuMapper;
import com.zdxf.service.MenuService;
import com.zdxf.util.JwtTokenUtil;
import com.zdxf.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    private MenuMapper menuMapper;


    @Override
    public Result addMenu(MenuDO menuDO) {
        return new Result(true, 20000, "success", menuMapper.addMenu(menuDO));
    }

    @Override
    public Result getList() {
        return new Result(true, 20000, "success", menuMapper.getList());
    }

    @Override
    public Result parentList() {
        return new Result(true, 20000, "success", menuMapper.parentList());
    }

    @Override
    public Result updateMenu(MenuDO menuDO) {
        return new Result(true, 20000, "success", menuMapper.updateMenu(menuDO));
    }

    @Override
    public Result deleteMenu(long id) {
        return new Result(true, 20000, "success", menuMapper.deleteMenu(id));
    }
}
